<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge">
    <title>留言板</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <script src="http://cdm.bootcss.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>

    <style type="text/css">
		.zong{width: 1200px; float: left; text-align: center; margin-bottom: 30px;}
		.diyi{width: 200px; height: 40px; background: #fff; float: left;}
		.dier{width: 200px; height: 40px; background: #fff; float: left;}
		.disan{width: 200px; height: 40px; background: #fff; float: left;}
		.disi{width: 200px; height: 40px; background: #fff; float: left;}
		.diwu{width: 200px; height: 40px; background: #fff; float: left;}
		.diliu{width: 200px; height: 40px; background: #fff; float: left;}
	</style>
</head>

<body>

<div class="zong">
	<h1 style="text-align: center;">会员管理</h1>
	{!! link_to('message/content', '返回'); !!}
</div>
<div class="zong">

	@if($users)
		@foreach($users as $value)
			<div class="diyi">{!! $value->id !!}</div>
			<div class="dier">{{ $value->user_name }}</div>
		    <div class="disan">{{ $value->email }}</div>
		    <div class="disi">{!! date('Y-m-d H:m:s', $value->create_time); !!}</div>
		    <div class="diliu">{!! link_to_action('CommentController',
				$value->status ? '拉入黑名单' : '恢复正常',
				['uid' => $value->id]
		    	); !!}</div>
		    <div class="diliu">{!! link_to_action('MessageController@handle_admin',
				$value->is_admin ? '取消管理员' : '设置为管理员',
				['uid' => $value->id]
		    	); !!}</div>
		@endforeach
	@else
		暂无会员
	@endif
</div>
<!-- 分页 -->
<div class="zong">
	{!! $users->links(); !!}
</div>
</body>
</html>


